"""
@-*- coding: utf-8 -*-
@ python: 3.12.3
@ 创建者: JacksonCode
@ 创建时间: 2025/6/21
"""
import requests

url = "https://www.eastmoney.com/"

response = requests.get(url)
print("查看状态码:", response.status_code)

# 设置响应数据的编码格式
response.encoding = 'utf-8'  # gbk     in order to solve mess code

page_text = response.text  # 返回字符串类型的响应数据

with open("./caifui.html", 'w', encoding='utf-8') as fp:
    fp.write(page_text)

print("spider finished!!!")
